Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 3 - Style Objects


About Style Objects

A style object exists to provide information about a shape. Each QuickDraw GX shape consists of a shape object, a style object, an ink object, and a transform object; the style object associated with a shape defines much of the shape's appearance, such as the size of the pen with which it is drawn or the size of its text.

QuickDraw GX identifies an individual style object through a style reference. To obtain information about a style object, you must send its reference as a parameter to a QuickDraw GX function (except that you can determine if two references identify the same style object simply by comparing them for equality, and you can examine a reference to see if it is nil).

Styles are device independent. Their information is not affected by the properties of the display device to which the shapes they modify are drawn.

There are three categories of information that style objects contain: graphic, typographic, and common. The graphic information applies to style objects associated with graphic shapes, the typographic information applies to style objects associated with typographic shapes, and the common information applies to both. Because the information is stored separately, the same style object can apply to both kinds of shapes. The QuickDraw GX object architecture allows you to perform several operations on a style object without regard for what kind it is; those are the operations described in this chapter. Features and operations specific to styles for graphic shapes are described in Inside Macintosh: QuickDraw GX Graphics; those specific to styles for typographic shapes are described in Inside Macintosh: QuickDraw GX Typography.


Subtopics
Style Object Properties
The Default Style Object

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996